From: John Wiegley Date: Mon, 17 Nov 2003 00:24:06 +0000 (+0000) Subject: (eshell-ls-file): There are times with size-width is nil and X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~24974 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=f3db0f0eef3fc6a3d95fb962c91f4fc7ec8d3a7f;p=emacs.git (eshell-ls-file): There are times with size-width is nil and uncomputed (when directories are created in dired, for example); in this case, 4 is reasonable default value, although it may caused skewed new entries (which could be avoided by returning the original value of 8 in all cases, but 99% of the time this is a waste of whitespace). --- diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index 1d018026e67..3b5252c18a1 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -480,8 +480,8 @@ whose cdr is the list of file attributes." "")) (let* ((str (eshell-ls-printable-size (nth 7 attrs))) (len (length str))) - (if (< len size-width) - (concat (make-string (- size-width len) ? ) str) + (if (< len (or size-width 4)) + (concat (make-string (- (or size-width 4) len) ? ) str) str)) " " (format-time-string (concat